﻿<cfsilent>
	<cfscript>
		
		dictAdvice = getProperty("serviceFactory").getBean("senateDictionaryAdvice");
		mathAdvice = getProperty("serviceFactory").getBean("senateMathAdvice");
		datetimeAdvice = getProperty("serviceFactory").getBean("datetimeAdvice");
		

		event.setArg("pageTitle", "打印成绩证明");

		/* 学校信息 */
		sql = "SELECT sch_name, sch_name_eng FROM t_school ";

		queryObj = new Query( datasource=application.dnsSlave );
			
		rs_school = queryObj.execute( sql=sql ).getResult();
		
		
		markId = event.getArg('SID');
		
		/* 学生成绩数据 */
		sql = "SELECT 
				t_student.stu_id, t_student.stu_name, t_student.stu_sex, t_student.stu_birthday, t_student.stu_idcard, 
				t_class.cls_name, 
				t_subject.level_code, t_subject.sbj_name, t_subject.schooling_length, 
				t_institute.institute_name, 
				t_cet.exam_name, 
				scroll, listening, reading, writing, integration 
				FROM t_cet_scroll 
				INNER JOIN t_cet ON t_cet.exam_id = t_cet_scroll.exam_id 
				INNER JOIN t_student ON t_student.stu_id = t_cet_scroll.stu_id 
				INNER JOIN t_class ON t_class.cls_id = t_student.cls_id 
				INNER JOIN t_subject ON t_subject.sbj_id = t_class.sbj_id 
				INNER JOIN t_institute ON t_institute.institute_id = t_subject.institute_id 
				WHERE 
					scroll_id = :markId ";
		
		queryObj = new Query( datasource=application.dnsSlave );
		queryObj.addParam( name="markId", value=markId, cfsqltype="cf_sql_varchar" );

		rs_scroll = queryObj.execute( sql=sql ).getResult();

		tagCode = "CET-" & markId;

	</cfscript>
</cfsilent>

<div class="UIreportTitle">
	<h2><cfoutput>#rs_school.sch_name#</cfoutput>外语等级考试成绩证明</h2>
</div>

<div style="margin-top:80px;"></div>

<table class="UIreportTable smaller centered">
	<tr height="40">
		<td>学号</td>
		<td><cfoutput>#rs_scroll.stu_id#</cfoutput></td>
		<td>姓名</td>
		<td><cfoutput>#rs_scroll.stu_name#</cfoutput></td>
		<td>性别</td>
		<td><cfoutput>#dictAdvice.getGender( rs_scroll.stu_sex )#</cfoutput></td>
		<td>班级</td>
		<td><cfoutput>#rs_scroll.cls_name#</cfoutput></td>
		<td rowspan="4" width="90" class="picture"><img width="90" height="120" align="middle" src="<cfoutput>#getContextRoot()#</cfoutput>/acadmicManager/student/print/<cfoutput>#rs_scroll.stu_id#</cfoutput>.jpg" /></td>
	</tr>
	<tr height="40">
		<td>出生日期</td>
		<td><cfoutput>#datetimeAdvice.formatDateString( rs_scroll.stu_birthday )#</cfoutput></td>
		<td>身份证</td>
		<td colspan="3"><cfoutput>#rs_scroll.stu_idcard#</cfoutput></td>
		<td>学历层次</td>
		<td><cfoutput>#dictAdvice.getStudentLevel( rs_scroll.level_code )#</cfoutput></td>
	</tr>
	<tr height="40">
		<td>专业</td>
		<td colspan="3"><cfoutput>#rs_scroll.sbj_name#</cfoutput></td>
		<td>学院</td>
		<td colspan="3"><cfoutput>#rs_scroll.institute_name#</cfoutput></td>
	</tr>
</table>

<div class="UIreportFoot">
	<table>
		<tr height="40">
			<td>准考证号: <cfoutput>#markId#</cfoutput></td>
			<td align="right">考试时间: <cfoutput>#mathAdvice.getCETRound( markId )#</cfoutput></td>
		</tr>
	</table>
</div>

<table class="UIreportTable smaller centered">
	<tr height="40">
		<td>科目</td>
		<td>总分</td>
		<td>听力</td>
		<td>阅读</td>
		<td>写作</td>
		<td>综合</td>
	</tr>
	<tr height="40">
		<td><cfoutput>#rs_scroll.exam_name#</cfoutput></td>
		<td><cfoutput>#rs_scroll.scroll#</cfoutput></td>
		<td><cfoutput>#rs_scroll.listening#</cfoutput></td>
		<td><cfoutput>#rs_scroll.reading#</cfoutput></td>
		<td><cfoutput>#rs_scroll.writing#</cfoutput></td>
		<td><cfoutput>#rs_scroll.integration#</cfoutput></td>
	</tr>
</table>

<div class="UIreportBody">
	<p>说明：</p>
	<ol>
		<li>本材料仅用于证明<cfoutput>#rs_scroll.stu_name#</cfoutput>于<cfoutput>#mathAdvice.getCETRound(markId)#</cfoutput>在我校报名参加了该年在我校考点进行的<cfoutput>#rs_scroll.exam_name#</cfoutput>考试，准考证号<cfoutput>#markId#</cfoutput>，考试成绩<cfoutput>#rs_scroll.scroll#</cfoutput>分。</li>
		<li>全国大学英语四、六级考试委员会颁发的成绩单遗失不予补发原件。向全国大学英语四、六级考试委员会申请补发CET考试成绩证明时，可使用该文档做为佐证材料。</li>
		<li>使用准考证号 <cfoutput>#markId#</cfoutput> 及姓名 <cfoutput>#rs_scroll.stu_name#</cfoutput> 可在全国大学四、六级考试官方网站 http://www.cet.edu.cn/ 对成绩进行核实。</li>
	</ol>
</div>
<div style="margin-top:150px;"></div>
<div class="UIreportFoot">
	<table>
		<tr>
			<td>打印时间 <cfoutput>#dateFormat(now(), "YYYY年MM月DD日")#</cfoutput></td>
			<td><cfoutput>#rs_school.sch_name#</cfoutput>考点 （签章有效）</td>
			<td align="right"><img src="<cfoutput>#getContextRoot()#</cfoutput>/barcode/Print/<cfoutput>#tagCode#</cfoutput>.png" height="43"/></td>
		</tr>
	</table>
</div>